<?php

/*
 * Fresns Control Panel (Standalone)
 * Copyright (C) 2021-Present 刘鑫
 * Released under the MIT License.
 */

namespace App\Plugins\FcpApi\TweetEmojis;

use App\Base\Services\BaseAdminService;
use App\Plugins\FcpApi\TweetConfigs\TweetConfigService;

class FsService extends BaseAdminService
{
    public function __construct()
    {
        $this->model = new FsModel();
        $this->resource = FsResource::class;
        $this->resourceDetail = FsResourceDetail::class;
    }

    public function common()
    {
        $common = parent::common();
        $languageArr = TweetConfigService::getLanguageStatus();
        $common['languagesOption'] = $languageArr['languagesOption'];

        return $common;
    }

    public function update($id)
    {
        parent::update($id);
        $this->model->hookUpdateAfter($id);
    }
}
